package com.ruoyi.caigou.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.caigou.mapper.PurchaseExecuteMapper;
import com.ruoyi.caigou.domain.PurchaseExecute;
import com.ruoyi.caigou.service.IPurchaseExecuteService;
import com.ruoyi.common.core.text.Convert;

/**
 * 采购执行记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-17
 */
@Service
public class PurchaseExecuteServiceImpl implements IPurchaseExecuteService 
{
    @Autowired
    private PurchaseExecuteMapper purchaseExecuteMapper;

    /**
     * 查询采购执行记录
     * 
     * @param id 采购执行记录主键
     * @return 采购执行记录
     */
    @Override
    public PurchaseExecute selectPurchaseExecuteById(Long id)
    {
        return purchaseExecuteMapper.selectPurchaseExecuteById(id);
    }

    /**
     * 查询采购执行记录列表
     * 
     * @param purchaseExecute 采购执行记录
     * @return 采购执行记录
     */
    @Override
    public List<PurchaseExecute> selectPurchaseExecuteList(PurchaseExecute purchaseExecute)
    {
        return purchaseExecuteMapper.selectPurchaseExecuteList(purchaseExecute);
    }

    /**
     * 新增采购执行记录
     * 
     * @param purchaseExecute 采购执行记录
     * @return 结果
     */
    @Override
    public int insertPurchaseExecute(PurchaseExecute purchaseExecute)
    {
        return purchaseExecuteMapper.insertPurchaseExecute(purchaseExecute);
    }

    /**
     * 修改采购执行记录
     * 
     * @param purchaseExecute 采购执行记录
     * @return 结果
     */
    @Override
    public int updatePurchaseExecute(PurchaseExecute purchaseExecute)
    {
        return purchaseExecuteMapper.updatePurchaseExecute(purchaseExecute);
    }

    /**
     * 批量删除采购执行记录
     * 
     * @param ids 需要删除的采购执行记录主键
     * @return 结果
     */
    @Override
    public int deletePurchaseExecuteByIds(String ids)
    {
        return purchaseExecuteMapper.deletePurchaseExecuteByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除采购执行记录信息
     * 
     * @param id 采购执行记录主键
     * @return 结果
     */
    @Override
    public int deletePurchaseExecuteById(Long id)
    {
        return purchaseExecuteMapper.deletePurchaseExecuteById(id);
    }
}
